; 日历初始化设置

;加载农历
(require-package 'cal-china-x)
(require 'cal-china-x)
;; 在日历中标记节假日
(setq mark-holidays-in-calendar t)
;; 在日历中显示中国农历节日
(setq cal-china-x-important-holidays cal-china-x-chinese-holidays)
(setq calendar-holidays cal-china-x-important-holidays)

(setq holiday-wwliu-holidays
      '(;;公历节日
        (holiday-fixed 1 1 "元旦")
        (holiday-fixed 2 14 "情人节")
        (holiday-fixed 3 8 "妇女节")
        (holiday-fixed 4 1 "愚人节")
        (holiday-fixed 5 1 "劳动节")
        (holiday-float 5 0 2 "母亲节")
        (holiday-fixed 6 1 "儿童节")
        (holiday-float 6 0 3 "父亲节")
        (holiday-fixed 9 10 "教师节")
        (holiday-fixed 10 1 "国庆节")
        (holiday-fixed 12 25 "圣诞节")
        ;;农历节日
        (holiday-lunar 1 1 "春节" 0)
        (holiday-lunar 1 2 "春节" 0)
        (holiday-lunar 1 3 "春节" 0)
        (holiday-lunar 1 4 "春节" 0)
        (holiday-lunar 1 5 "春节" 0)
        (holiday-lunar 1 6 "春节" 0)
        (holiday-lunar 1 15 "元宵节" 0)
        (holiday-solar-term "清明" "清明节")
        (holiday-lunar 5 5 "端午节" 0)
        (holiday-lunar 8 15 "中秋节" 0)
        (holiday-lunar 9 9 "重阳节" 0)
        (holiday-lunar 12 30 "除夕" 0)
        ;;生日
        (holiday-lunar 5 12 "我的生日" 0)
        (holiday-lunar 5 28 "果儿生日" 0)
        (holiday-lunar 10 12 "姐姐生日" 0)
        (holiday-lunar 11 29 "老婆生日" 0)
        (holiday-lunar 11 30 "爸爸生日" 0)
        (holiday-lunar 12 12 "妈妈生日" 0)))
;;只显示定制的节日
(setq calendar-holidays holiday-wwliu-holidays)
;;设置diary文件
(setq diary-file "~/.diary")

;;开启约会提醒功能
(appt-activate 1)
;;开启diary文件中的日程提醒
(setq appt-display-diary nil)
;;提醒方式
(setq appt-display-format 'window)
;;提前1分钟提醒
(setq appt-message-warning-time '1)
;;提醒窗口持续120s
(setq appt-display-duration '120)
;;使能声音提醒
(setq attp-audible t) ;不知的为啥这样没有声音
(setq appt-audible (cons 3 .5)) ;这样有一声'咚'
;;在状态栏提醒
(setq appt-display-mode-line t)

;;以下添加一些日常提醒任务
(appt-add "12:00" "下班吃饭" 1)
(appt-add "17:30" "下班回家" 1)

(provide 'init-cal)
